<%@page contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@include file="/common/definition.jsp"%>

<html:html>
<tiles:insert beanName="admin-definition" flush="true">
	<tiles:put name="title"> Administrator Management </tiles:put>
	<tiles:put name="body" type="string">

		<div class="row mainHome">
			<div class="col-md-12">
				<s:form action="editProductDetail" enctype="multipart/form-data"
					theme="simple">
					<div class="col-md-offset-3 form-group">
						<h1>Chi tiết sản phẩm</h1>
					</div>
					<div class="form-group">
						<s:property value="errorAddProduct" />
					</div>
					<div class="col-md-offset-1 form-group">
						<label>Product Name</label>
						<s:textfield name="productInfo.productName" cssClass="form-control" />
					</div>
					<div class="col-md-offset-1 form-group">
						<label><strong>Danh Mục:</strong> </label> <select
							class="form-control" name="catID" id="catID">
							<option value=0>Chọn Danh Mục</option>
							<s:iterator value="productModel.listSubcat" id="list">
								<s:iterator value="listinfo">
									<s:if test="productInfo.catID == catID">
										<option value='<s:property value="catID"/>'
											selected="selected">
											<s:property value="catName" />
										</option>
									</s:if>
									<s:else>
										<option value='<s:property value="catID"/>'>
											<s:property value="catName" />
										</option>
									</s:else>
								</s:iterator>
							</s:iterator>
						</select>
					</div>
					<div class="col-md-offset-1 form-group">
						<label><strong>Nhà Sản Xuất:</strong> </label> <select
							class="form-control" tabindex="1" name="brandID" id="brandID">
							<option value=0>Chọn Nhà Sản Xuất</option>
							<s:iterator value="productModel.listBrandInfo" id="list">
								<s:if test="productInfo.brandID == brandID">
									<option value='<s:property value="brandID"/>'
										selected="selected">
										<s:property value="brandName" />
									</option>
								</s:if>
								<s:else>
									<option value='<s:property value="brandID"/>'>
										<s:property value="brandName" />
									</option>
								</s:else>
							</s:iterator>
						</select>
					</div>
					<div class="col-md-12 form-group" style="padding-top: 80px; padding-left: 5px; padding-right: 5px">
						<textarea id="editor1" name="productInfo.contentOfWeb" rows="10" cols="80">
						<s:property value="productInfo.contentOfWeb"/>
						</textarea>
			            <script>
			                // Replace the <textarea id="editor1"> with a CKEditor
			                // instance, using default configuration.
			                CKEDITOR.replace( 'editor1' );
			            </script>
		            </div>
					<div class="form-group pull-right">
						<button Class="btn btn-primary">Thay Đổi</button>
						<button type="reset" class="btn btn-default">Nhập Lại</button>
					</div>
					<s:hidden name="productInfo.productID" value="%{productInfo.productID}" />
				</s:form>
			</div>
		</div>

	</tiles:put>
</tiles:insert>
</html:html>

